/**
 * paintPiece.java
 * Auti i class ine ipethini gia kathe Piece tou GUI.
 * Me tetio tropo oste na ta boroun na dimiourgithoun sto Board.
 */

package GUI;

import java.awt.Point;

/**
 * 
 * @author Stordopoulos Dimitris <stordop@csd.uoc.gr>
 */
public class paintPiece extends sqrGUI{
    
    public paintPiece(){ super(); }
    
    /**
     * 
     * @param mov An to Piece ine metakinisimo i ohi.
     * @param pos I thesi tou Piece ( tipou Point ).
     * @param name To onoma tou Piece ( eg. Bishop ).
     * @param clr To hroma gia to Pawn, vasi tou opiou tha apofasisti to icon.
     */
    public paintPiece(boolean mov, Point pos ,char clr, String name){
        this();
        if( clr=='w'){ setPieceImage("W"+name+".png"); }
        else{ setPieceImage("B"+name+".png"); } // black pawn !!!
        setPieceColor(clr);
        setMovability(mov);
    }
}